package test;

public class test6_衍生 {
    public static void main(String[] args) {
        //创建对象
        test6_类于对象 phone = new test6_类于对象();
        //赋值
        phone.brand = "小米";
        phone.price = 20000;
        //查看赋值成功与否
        System.out.println(phone.brand);
        System.out.println(phone.price);
        //调用方法
        phone.call();
        phone.playGema();

        //设置另一个对象
        test6_类于对象 phone01 = new test6_类于对象();
        phone01.brand = "oppo";
        phone01.price = 1599;
        //查看是否赋值成功
        System.out.println(phone01.brand);
        System.out.println(phone01.price);
        //调用方法
        phone01.call();
        phone01.playGema();
    }

}
